import doctor from '@/router/doctor/doctor'
import request from '@/utils/request'

// 分页查询角色数据
export const findDoctorAlls = (pageNum , pageSize , doctor) => {
    return request({
        url: '/admin/doctors/doctorController/findDoctorAlls/' + pageNum + "/" + pageSize,
        method: 'get',
        params: doctor
    })
}

export const findDoctorAll = () => {
  return request({
      url: '/admin/doctors/doctorController/findDoctorAll',
      method: 'get',
  })
}

// 添加医师
export const addDoctor = doctor => {
    return request({
      url: `/admin/doctors/doctorController/addDoctor`,
      method: 'post',
      data: doctor,
    })
}

// 修改医师信息
export const updateDoctor = doctor => {
    return request({
      url: `/admin/doctors/doctorController/updateDoctor`,
      method: 'put',
      data: doctor,
    })
}

// 根据id删除医师
export const deleteDoctor = id => {
    return request({
      url: `/admin/doctors/doctorController/deleteDoctor/${id}`,
      method: 'get',
    })
  }